3.8.32 \(\int (d+e x)^3 (a+c x^2)^p \, dx\) [732]

Optimal. Leaf size=178 \[ \frac {e (d+e x)^2 \left (a+c x^2\right )^{1+p}}{2 c (2+p)}-\frac {e \left ((3+2 p) \left (a e^2-c d^2 (5+2 p)\right )-2 c d e (1+p) (3+p) x\right ) \left (a+c x^2\right )^{1+p}}{2 c^2 (2+p) \left (3+5 p+2 p^2\right )}-\frac {d \left (3 a e^2-c d^2 (3+2 p)\right ) x \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {c x^2}{a}\right )}{c (3+2 p)} \]

[Out]

1/2*e*(e*x+d)^2*(c*x^2+a)^(1+p)/c/(2+p)-1/2*e*((3+2*p)*(a*e^2-c*d^2*(5+2*p))-2*c*d*e*(1+p)*(3+p)*x)*(c*x^2+a)^
(1+p)/c^2/(2+p)/(2*p^2+5*p+3)-d*(3*a*e^2-c*d^2*(3+2*p))*x*(c*x^2+a)^p*hypergeom([1/2, -p],[3/2],-c*x^2/a)/c/(3
+2*p)/((c*x^2/a+1)^p)

________________________________________________________________________________________

Rubi [A]
time = 0.10, antiderivative size = 169, normalized size of antiderivative = 0.95, number of steps used = 4, number of rules used = 4, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.235, Rules used = {757, 794, 252, 251} \begin {gather*} -\frac {e \left (a+c x^2\right )^{p+1} \left ((2 p+3) \left (a e^2-c d^2 (2 p+5)\right )-2 c d e (p+1) (p+3) x\right )}{2 c^2 (p+2) \left (2 p^2+5 p+3\right )}+d x \left (a+c x^2\right )^p \left (\frac {c x^2}{a}+1\right )^{-p} \left (d^2-\frac {3 a e^2}{2 c p+3 c}\right ) \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {c x^2}{a}\right )+\frac {e (d+e x)^2 \left (a+c x^2\right )^{p+1}}{2 c (p+2)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^3*(a + c*x^2)^p,x]

[Out]

(e*(d + e*x)^2*(a + c*x^2)^(1 + p))/(2*c*(2 + p)) - (e*((3 + 2*p)*(a*e^2 - c*d^2*(5 + 2*p)) - 2*c*d*e*(1 + p)*
(3 + p)*x)*(a + c*x^2)^(1 + p))/(2*c^2*(2 + p)*(3 + 5*p + 2*p^2)) + (d*(d^2 - (3*a*e^2)/(3*c + 2*c*p))*x*(a +
c*x^2)^p*Hypergeometric2F1[1/2, -p, 3/2, -((c*x^2)/a)])/(1 + (c*x^2)/a)^p

Rule 251

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, (-b)*(x^n/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rule 252

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[a^IntPart[p]*((a + b*x^n)^FracPart[p]/(1 + b*(x^n/a))^Fra
cPart[p]), Int[(1 + b*(x^n/a))^p, x], x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILt
Q[Simplify[1/n + p], 0] &&  !(IntegerQ[p] || GtQ[a, 0])

Rule 757

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[e*(d + e*x)^(m - 1)*((a + c*x^2)^(p
 + 1)/(c*(m + 2*p + 1))), x] + Dist[1/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 2)*Simp[c*d^2*(m + 2*p + 1) - a*e^
2*(m - 1) + 2*c*d*e*(m + p)*x, x]*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2,
0] && If[RationalQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadraticQ[a, 0, c, d, e, m
, p, x]

Rule 794

Int[((d_.) + (e_.)*(x_))*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((e*f + d*g)*(2*p
+ 3) + 2*e*g*(p + 1)*x)*((a + c*x^2)^(p + 1)/(2*c*(p + 1)*(2*p + 3))), x] - Dist[(a*e*g - c*d*f*(2*p + 3))/(c*
(2*p + 3)), Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, p}, x] &&  !LeQ[p, -1]

Rubi steps

\begin {align*} \int (d+e x)^3 \left (a+c x^2\right )^p \, dx &=\frac {e (d+e x)^2 \left (a+c x^2\right )^{1+p}}{2 c (2+p)}+\frac {\int (d+e x) \left (-2 \left (a e^2-c d^2 (2+p)\right )+2 c d e (3+p) x\right ) \left (a+c x^2\right )^p \, dx}{2 c (2+p)}\\ &=\frac {e (d+e x)^2 \left (a+c x^2\right )^{1+p}}{2 c (2+p)}-\frac {e \left ((3+2 p) \left (a e^2-c d^2 (5+2 p)\right )-2 c d e (1+p) (3+p) x\right ) \left (a+c x^2\right )^{1+p}}{2 c^2 (2+p) \left (3+5 p+2 p^2\right )}+\left (d \left (d^2-\frac {3 a e^2}{3 c+2 c p}\right )\right ) \int \left (a+c x^2\right )^p \, dx\\ &=\frac {e (d+e x)^2 \left (a+c x^2\right )^{1+p}}{2 c (2+p)}-\frac {e \left ((3+2 p) \left (a e^2-c d^2 (5+2 p)\right )-2 c d e (1+p) (3+p) x\right ) \left (a+c x^2\right )^{1+p}}{2 c^2 (2+p) \left (3+5 p+2 p^2\right )}+\left (d \left (d^2-\frac {3 a e^2}{3 c+2 c p}\right ) \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p}\right ) \int \left (1+\frac {c x^2}{a}\right )^p \, dx\\ &=\frac {e (d+e x)^2 \left (a+c x^2\right )^{1+p}}{2 c (2+p)}-\frac {e \left ((3+2 p) \left (a e^2-c d^2 (5+2 p)\right )-2 c d e (1+p) (3+p) x\right ) \left (a+c x^2\right )^{1+p}}{2 c^2 (2+p) \left (3+5 p+2 p^2\right )}+d \left (d^2-\frac {3 a e^2}{3 c+2 c p}\right ) x \left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {c x^2}{a}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.31, size = 223, normalized size = 1.25 \begin {gather*} \frac {\left (a+c x^2\right )^p \left (1+\frac {c x^2}{a}\right )^{-p} \left (2 c^2 d^3 \left (2+3 p+p^2\right ) x \, _2F_1\left (\frac {1}{2},-p;\frac {3}{2};-\frac {c x^2}{a}\right )+e \left (c^2 x^2 \left (1+\frac {c x^2}{a}\right )^p \left (3 d^2 (2+p)+e^2 (1+p) x^2\right )-a^2 e^2 \left (-1+\left (1+\frac {c x^2}{a}\right )^p\right )+a c \left (e^2 p x^2 \left (1+\frac {c x^2}{a}\right )^p+3 d^2 (2+p) \left (-1+\left (1+\frac {c x^2}{a}\right )^p\right )\right )+2 c^2 d e \left (2+3 p+p^2\right ) x^3 \, _2F_1\left (\frac {3}{2},-p;\frac {5}{2};-\frac {c x^2}{a}\right )\right )\right )}{2 c^2 (1+p) (2+p)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^3*(a + c*x^2)^p,x]

[Out]

((a + c*x^2)^p*(2*c^2*d^3*(2 + 3*p + p^2)*x*Hypergeometric2F1[1/2, -p, 3/2, -((c*x^2)/a)] + e*(c^2*x^2*(1 + (c
*x^2)/a)^p*(3*d^2*(2 + p) + e^2*(1 + p)*x^2) - a^2*e^2*(-1 + (1 + (c*x^2)/a)^p) + a*c*(e^2*p*x^2*(1 + (c*x^2)/
a)^p + 3*d^2*(2 + p)*(-1 + (1 + (c*x^2)/a)^p)) + 2*c^2*d*e*(2 + 3*p + p^2)*x^3*Hypergeometric2F1[3/2, -p, 5/2,
 -((c*x^2)/a)])))/(2*c^2*(1 + p)*(2 + p)*(1 + (c*x^2)/a)^p)

________________________________________________________________________________________

Maple [F]
time = 0.11, size = 0, normalized size = 0.00 \[\int \left (e x +d \right )^{3} \left (c \,x^{2}+a \right )^{p}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^3*(c*x^2+a)^p,x)

[Out]

int((e*x+d)^3*(c*x^2+a)^p,x)

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+a)^p,x, algorithm="maxima")

[Out]

integrate((x*e + d)^3*(c*x^2 + a)^p, x)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+a)^p,x, algorithm="fricas")

[Out]

integral((x^3*e^3 + 3*d*x^2*e^2 + 3*d^2*x*e + d^3)*(c*x^2 + a)^p, x)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 337 vs. \(2 (151) = 302\).
time = 6.97, size = 437, normalized size = 2.46 \begin {gather*} a^{p} d^{3} x {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, - p \\ \frac {3}{2} \end {matrix}\middle | {\frac {c x^{2} e^{i \pi }}{a}} \right )} + a^{p} d e^{2} x^{3} {{}_{2}F_{1}\left (\begin {matrix} \frac {3}{2}, - p \\ \frac {5}{2} \end {matrix}\middle | {\frac {c x^{2} e^{i \pi }}{a}} \right )} + 3 d^{2} e \left (\begin {cases} \frac {a^{p} x^{2}}{2} & \text {for}\: c = 0 \\\frac {\begin {cases} \frac {\left (a + c x^{2}\right )^{p + 1}}{p + 1} & \text {for}\: p \neq -1 \\\log {\left (a + c x^{2} \right )} & \text {otherwise} \end {cases}}{2 c} & \text {otherwise} \end {cases}\right ) + e^{3} \left (\begin {cases} \frac {a^{p} x^{4}}{4} & \text {for}\: c = 0 \\\frac {a \log {\left (x - \sqrt {- \frac {a}{c}} \right )}}{2 a c^{2} + 2 c^{3} x^{2}} + \frac {a \log {\left (x + \sqrt {- \frac {a}{c}} \right )}}{2 a c^{2} + 2 c^{3} x^{2}} + \frac {a}{2 a c^{2} + 2 c^{3} x^{2}} + \frac {c x^{2} \log {\left (x - \sqrt {- \frac {a}{c}} \right )}}{2 a c^{2} + 2 c^{3} x^{2}} + \frac {c x^{2} \log {\left (x + \sqrt {- \frac {a}{c}} \right )}}{2 a c^{2} + 2 c^{3} x^{2}} & \text {for}\: p = -2 \\- \frac {a \log {\left (x - \sqrt {- \frac {a}{c}} \right )}}{2 c^{2}} - \frac {a \log {\left (x + \sqrt {- \frac {a}{c}} \right )}}{2 c^{2}} + \frac {x^{2}}{2 c} & \text {for}\: p = -1 \\- \frac {a^{2} \left (a + c x^{2}\right )^{p}}{2 c^{2} p^{2} + 6 c^{2} p + 4 c^{2}} + \frac {a c p x^{2} \left (a + c x^{2}\right )^{p}}{2 c^{2} p^{2} + 6 c^{2} p + 4 c^{2}} + \frac {c^{2} p x^{4} \left (a + c x^{2}\right )^{p}}{2 c^{2} p^{2} + 6 c^{2} p + 4 c^{2}} + \frac {c^{2} x^{4} \left (a + c x^{2}\right )^{p}}{2 c^{2} p^{2} + 6 c^{2} p + 4 c^{2}} & \text {otherwise} \end {cases}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**3*(c*x**2+a)**p,x)

[Out]

a**p*d**3*x*hyper((1/2, -p), (3/2,), c*x**2*exp_polar(I*pi)/a) + a**p*d*e**2*x**3*hyper((3/2, -p), (5/2,), c*x
**2*exp_polar(I*pi)/a) + 3*d**2*e*Piecewise((a**p*x**2/2, Eq(c, 0)), (Piecewise(((a + c*x**2)**(p + 1)/(p + 1)
, Ne(p, -1)), (log(a + c*x**2), True))/(2*c), True)) + e**3*Piecewise((a**p*x**4/4, Eq(c, 0)), (a*log(x - sqrt
(-a/c))/(2*a*c**2 + 2*c**3*x**2) + a*log(x + sqrt(-a/c))/(2*a*c**2 + 2*c**3*x**2) + a/(2*a*c**2 + 2*c**3*x**2)
 + c*x**2*log(x - sqrt(-a/c))/(2*a*c**2 + 2*c**3*x**2) + c*x**2*log(x + sqrt(-a/c))/(2*a*c**2 + 2*c**3*x**2),
Eq(p, -2)), (-a*log(x - sqrt(-a/c))/(2*c**2) - a*log(x + sqrt(-a/c))/(2*c**2) + x**2/(2*c), Eq(p, -1)), (-a**2
*(a + c*x**2)**p/(2*c**2*p**2 + 6*c**2*p + 4*c**2) + a*c*p*x**2*(a + c*x**2)**p/(2*c**2*p**2 + 6*c**2*p + 4*c*
*2) + c**2*p*x**4*(a + c*x**2)**p/(2*c**2*p**2 + 6*c**2*p + 4*c**2) + c**2*x**4*(a + c*x**2)**p/(2*c**2*p**2 +
 6*c**2*p + 4*c**2), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(c*x^2+a)^p,x, algorithm="giac")

[Out]

integrate((x*e + d)^3*(c*x^2 + a)^p, x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (c\,x^2+a\right )}^p\,{\left (d+e\,x\right )}^3 \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + c*x^2)^p*(d + e*x)^3,x)

[Out]

int((a + c*x^2)^p*(d + e*x)^3, x)

________________________________________________________________________________________